package com.zpark.service.impl;

import com.zpark.mapper.IPersonMapper;
import com.zpark.pojo.Person;
import com.zpark.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @PackageName: com.zpark.service.impl
 * @ClassName: PersonServiceImpl
 * @Description:
 * @author: RZS
 * @date: 2024/3/6  9:46
 */
@Service
public class PersonServiceImpl implements IPersonService {

    // 自动注入持久层对象
    @Autowired
    private IPersonMapper personMapper;

    @Override
    public Person findByUsername(String name) {
        return personMapper.selectByUsername(name);
    }

    @Override
    public Person findById(Integer id) {
        return personMapper.selectById(id);
    }
}
